#!/usr/bin/make -f

# For some crappy reason Ubuntu includes this flag by default when building deb
# packages. This breaks signal/slot connections across *.sos in
# Corrade::Interconnect library and as said on the links below, it has some
# noticeable unintended/dangerous effects as well, so I'm just disabling it
# globally. See:
#  http://stackoverflow.com/questions/7216973/is-there-a-downside-to-using-bsymbolic-functions
#  https://software.intel.com/en-us/articles/performance-tools-for-software-developers-bsymbolic-can-cause-dangerous-side-effects
export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions

%:
	dh $@ --parallel

override_dh_auto_configure:
	dh_auto_configure -- \
		-DCMAKE_BUILD_TYPE=Release \
		-DWITH_ASSIMPIMPORTER=ON \
		-DWITH_BASISIMAGECONVERTER=OFF \
		-DWITH_BASISIMPORTER=OFF \
		-DWITH_DDSIMPORTER=ON \
		-DWITH_DEVILIMAGEIMPORTER=ON \
		-DWITH_DRFLACAUDIOIMPORTER=ON \
		-DWITH_DRMP3AUDIOIMPORTER=ON \
		-DWITH_DRWAVAUDIOIMPORTER=ON \
		-DWITH_FAAD2AUDIOIMPORTER=ON \
		-DWITH_FREETYPEFONT=ON \
		-DWITH_GLSLANGSHADERCONVERTER=OFF \
		-DWITH_ICOIMPORTER=ON \
		-DWITH_JPEGIMAGECONVERTER=ON \
		-DWITH_JPEGIMPORTER=ON \
		-DWITH_MESHOPTIMIZERSCENECONVERTER=OFF \
		-DWITH_MINIEXRIMAGECONVERTER=ON \
		-DWITH_OPENGEXIMPORTER=ON \
		-DWITH_PNGIMAGECONVERTER=ON \
		-DWITH_PNGIMPORTER=ON \
		-DWITH_PRIMITIVEIMPORTER=ON \
		-DWITH_SPIRVTOOLSSHADERCONVERTER=OFF \
		-DWITH_STANFORDIMPORTER=ON \
		-DWITH_STANFORDSCENECONVERTER=ON \
		-DWITH_STBIMAGECONVERTER=ON \
		-DWITH_STBIMAGEIMPORTER=ON \
		-DWITH_STBTRUETYPEFONT=ON \
		-DWITH_STBVORBISAUDIOIMPORTER=ON \
		-DWITH_STLIMPORTER=ON \
		-DWITH_TINYGLTFIMPORTER=ON
